import http from "./request"

// 获取角色列表
export const getListApi = async params => {
    return await http.get('/api/role/list', params)
}

// 新增角色
export const addRoleApi = async params => {
    return await http.post('/api/role', params)
}

// 编辑角色
export const editRoleApi = async params => {
    return await http.put('/api/role', params)
}

// 删除角色
export const deleteRoleApi = async params => {
    return await http.delete('/api/role', params)
}

// 获取权限树
export const assignRoleApi = async params => {
    return await http.get('/api/role/getAssignShow', params)
}

// 分配权限保存
export const saveAssignApi = async params => {
    return await http.post('/api/role/saveRoleMenu', params)
}